using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
using System.IO;

public partial class Upload : System.Web.UI.Page
{
	protected void Page_Load(object sender, EventArgs e)
	{
		byte[] rawData = new byte[Request.InputStream.Length];

		try
		{
			Request.InputStream.Read(rawData, 0, (int)Request.InputStream.Length);
			
			StringBuilder content = new StringBuilder();
			Response.ContentEncoding = "text/html";
			foreach (byte b in rawData)
				content.Append(Convert.ToChar(b));

			if (content.Length > 0)
				Response.Write(content.ToString());
			else
				Response.Write("Client Error: No data sent.");
			
			Response.End();
		}
		catch (Exception)
		{

			Response.Write("Server Error: Processing uploaded data failed.");
		}

	}
}
